import sys
import os
sys.path.append(os.path.abspath("."))
from utils import *

import os 

train_x, train_y = load_abnormal(
    meta_path="./data/meta_0db_id_00.json",
    return_numpy=True,
    train=True,
    X_type="logmel"
)

test_x, test_y = load_abnormal(
    meta_path="./data/meta_0db_id_00.json",
    return_numpy=True,
    train=False,
    X_type="logmel"
)

train_x = train_x.reshape(train_x.shape[0], -1)
test_x = test_x.reshape(test_x.shape[0], -1)

model = ASSVM(C=100)
model.fit(train_x)
